import http from '@/utils/http'

export const addCart = (params) => {
	const url = 'api/cart/add'
	return http.post(url, params)
}

export const getCartNum = () => {
	const url = 'api/cart/count?numType=0'
	return http.get(url)
}

export const getCartList = (params) => {
	const url = 'api/cart/list'
	return http.get(url, { params })
}

export const updateCartNum = (params) => {
	const url = 'api/cart/num'
	return http.post(url, params)
}
